package com.dhecp.project.api.service;

import com.dhecp.project.api.domain.ApiResponse;
import com.dhecp.project.api.domain.FbaBox;
import com.dhecp.project.api.domain.FbaLogsticsOrderDetail;
import com.dhecp.project.api.domain.FbaWarehousing;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface ApiFbaInboundService {

	/**
	 * 头程下单(手动创建货件)
	 */
	ApiResponse addParcel(Map<String, Object> params) throws Exception;
	/**
	 * 头程下单(自动创建货件)
	 */
	ApiResponse addParcelZD(Map<String, Object> params) throws Exception;

	/**
	 * 头程货件回退(取消货件)
	 */
	ApiResponse cancelParcel(Map<String, Object> params) throws Exception;

	/**
	 * 头程装箱并发货回退
	 */
	ApiResponse rollbackState(Map<String, Object> params) throws Exception;

	/**
	 * 强制回退
	 * @param params
	 * @return
	 * @throws Exception
	 */
	ApiResponse forcedRollback(Map<String, Object> params) throws Exception;

	/**
	 * 头程货件上传箱子数据
	 */
	ApiResponse placeOrder(Map<String, Object> params) throws Exception;

	/**
	 * 头程装箱自动上传箱子数据
	 */
	ApiResponse placeOrderZd(Map<String, Object> params) throws Exception;

	/**
	 * 头程货件修改或者删除
	 */
	ApiResponse deleteOrModify(Map<String, Object> params) throws Exception;
	/**
	 * 头程货件自动修改成发货状态
	 */
	ApiResponse zdModify(Map<String, Object> params) throws Exception;
	/**
	 * 打印箱标
	 */
	ApiResponse getLabels(Map<String, Object> params) throws Exception;

	ApiResponse getLabelsWc(Map<String, Object> params) throws Exception;
	/**
	 * 导入FBA
	 */
	ApiResponse fbaImport(Map<String, Object> params) throws Exception;

	void openPdf(Map<String, Object> params, HttpServletResponse response);
	/**
	 * 头程完成回退
	 */
	ApiResponse completeBackoff(Map<String, Object> params) throws Exception;

	/**
	 * 头程货件取消已装箱
	 */
	ApiResponse unbox(Map<String, Object> params) throws Exception;


	/**
	 * 定时修改头程线上发货状态
	 * @return
	 */
	ApiResponse updateFbaInbound(FbaBox fbaBox, List<FbaLogsticsOrderDetail> fbaLogsticsOrderDetailListNew,
								 List<FbaLogsticsOrderDetail> fbaLogsticsOrderDetailList, ApiResponse apiResponse, Map<String, Object> params);

	/**
	 * 上传头程追踪编号
	 */
	ApiResponse uploadtraceNumber(Map<String, Object> params) throws Exception;


	/**
	 * 海外尾程单审核
	 */
	ApiResponse updateStateName(Map<String, Object> params) throws Exception;

	/**
	 * 查看fba状态 以及数量
	 */
	ApiResponse getTransportDetails(FbaWarehousing fbaWarehousing,ApiResponse apiResponse);

	void getCs();

	/**
	 * 完成单拆箱
	 * @param params
	 * @return
	 * @throws Exception
	 */
	ApiResponse devanningWc(Map<String, Object> params) throws Exception;

}
